#ifndef IVIRTUALDEVICE_H
#define IVIRTUALDEVICE_H
#include <QObject>

#include "Auxiliary/Model/countresultdao.h"

class IVirtualDevice : public QObject
{
    Q_OBJECT
public:
    enum TimeFunctionState {
        Idle,
        Running,
        Waiting,
        Successful,  // implies AllowTabbedDocks, !AllowNestedDocks
        Fault      // implies AllowTabbedDocks
    };

    IVirtualDevice();
    virtual ~IVirtualDevice();
    virtual int sendTimeFunc(const QString &optName, const QString &timeName);
    virtual int sendCommand(const QString &optName, const QString &cmdName, const QByteArray &data);
    virtual int getKeyState();
    virtual bool isValid();
    virtual QString getOptName();
    virtual QString getTimeFuncResult();
    virtual CountResultDao *getFPGAResult();
    virtual QString getFaultDescription();

signals:
    void timeFuncCompelet(IVirtualDevice::TimeFunctionState tfSta);

public slots:
    virtual void onSerialDataArrived(const QByteArray &data);
};

#endif // IVIRTUALDEVICE_H
